package com.hn658.base.message.common.enums;

/**
 * 通知类型
 * Created by baihai on 2015/11/19.
 */
public enum NotifyType {


    /**
     * 普通私聊
     */
    SingleChat(1),

    /**
     * 普通群聊
     */
    GroupChat(2),
    
    /**
     * 系统通知
     */
    SystemNotify(3);



    private int value;

    NotifyType(int value) {
        this.value = value;
    }

    public static NotifyType getMessageTypeByValue(int value){
        for (NotifyType type : NotifyType.values()) {
            if (type.getValue() == value) {
                return type;
            }
        }

        throw new IllegalArgumentException("未能找到匹配的NotifyType:" + value);
    }

    public int getValue() {
        return this.value;
    }

}
